load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_test(
    name = "go_default_test",
    srcs = [
        "admit_suite_test.go",
        "disks_test.go",
        "storagehotplug_test.go",
        "vm-storage-admitter_test.go",
        "vmexport_test.go",
        "vmrestore_test.go",
        "vmsnapshot_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/apimachinery/patch:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/testutils:go_default_library",
        "//pkg/util/webhooks:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-config/featuregate:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/export/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/api:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubevirt/fake:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/go.uber.org/mock/gomock:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
    ],
)

go_library(
    name = "go_default_library",
    srcs = [
        "data-volume-template.go",
        "disks.go",
        "storagehotplug.go",
        "vm-storage-admitter.go",
        "vm-storage-status.go",
        "vmexport.go",
        "vmrestore.go",
        "vmsnapshot.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/storage/admitters",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/storage/backend-storage:go_default_library",
        "//pkg/util/hardware:go_default_library",
        "//pkg/util/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//staging/src/kubevirt.io/api/core:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/export/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//vendor/k8s.io/api/admission/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
    ],
)
